import useAuth from "@/hooks/useAuth"
import { Navigate } from "react-router-dom"
const ProtectedRouted=({Comp})=>{
const isAuth=useAuth()
if(!isAuth){
    return <Navigate to='/login'></Navigate>
}
return Comp
}

export default ProtectedRouted